package progetto;

import peersim.config.Configuration;
import peersim.core.Protocol;

/**
 * @author catia
 *
 */
public class SquareSize {
	
	
	private static SquareSize singleObject;
	
	/**
	 * normalized size of the square 
	 * 
	 * 
	 *//*
	private static final double NORM_SIZE = 1;*/
	
	/**
	 * real size of the square (m*m)
	 */
	private double size;
	
	
	private SquareSize(){
		this.size = -1;
		
	}
	
	public static SquareSize getIstance() {
		if(singleObject == null) {
			singleObject = new SquareSize();
		} 
		
		return singleObject;
	}
	
	
	

	public double getSize() {
		return size;
	}

	public boolean initializesSize(double size) {
		if(this.size == -1) {
			this.size = size;
			return true;
		}
		return false;
	}

	private void setSize(double size) {
		this.size = size;
	}
	
	
	
	
	
	
	
	
}
